package cn.itzzx.lagou.service.impl;

import cn.hutool.core.util.RandomUtil;
import cn.itzzx.lagou.api.ApiService;
import org.apache.dubbo.config.annotation.Service;

@Service(timeout = 120000)
public class ApiServiceImpl implements ApiService {

    @Override
    public void method1() {
        try {
            long time = RandomUtil.randomLong(1000, 99999);
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("method1");
    }

    @Override
    public void method2() {
        try {
            long time = RandomUtil.randomLong(1000, 99999);
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("method2");
    }

    @Override
    public void method3() {
        try {
            long time = RandomUtil.randomLong(1000, 99999);
            Thread.sleep(time);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("method3");
    }
}
